package com.universalInterface.lims_interface.vo.api.param;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * @author xvhuazhong
 * @date 2023/12/25 15:18
 * @description
 */
@Schema(description = "创建试验项目云空间")
@Data
public class TestSpaceParam implements Serializable {

    private static final long serialVersionUID = 2301084193821952862L;

    @NotNull(message = "实验室编号不能为空")
    @Schema(name = "labNum", description = "实验室编号")
    private String labNum;


    @NotBlank(message = "试验信息不能为空")
//    @Size(max = 255)
    @Schema(name = "testInfo", description = "实验室名称")
    private String testInfo;

    @NotBlank(message = "用户名不能为空")
    @Schema(description = "用户名")
    private String user;

    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = "^(?=.*\\d)(?=.*[a-zA-Z])(?=.*[^\\da-zA-Z\\s]).{8,16}$", message = "密码必须包含大小写字母,特殊字符和数字，且长度不低于8位")
    @Schema(description = "密码")
    private String password;
}
